(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 11.3' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[      7766,        197]
NotebookOptionsPosition[      5916,        159]
NotebookOutlinePosition[      6259,        174]
CellTagsIndexPosition[      6216,        171]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Objects", "Title",
 CellChangeTimes->{{3.73910608245113*^9, 3.739106084891464*^9}, {
  3.739107719654417*^9, 3.7391077233423896`*^9}, {3.7395556414029284`*^9, 
  3.7395556422577505`*^9}},ExpressionUUID->"1297967f-cb5a-4edf-9d0c-\
e27dd8a50146"],

Cell["Find the library:", "Text",
 CellChangeTimes->{{3.7391061370592537`*^9, 
  3.739106148506667*^9}},ExpressionUUID->"c510ce96-e2d9-423d-b2ed-\
552735483f57"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"library", "=", 
  RowBox[{"FileNameJoin", "[", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"NotebookDirectory", "[", "]"}], ",", "\"\<build\>\"", ",", 
     "\"\<Debug\>\"", ",", "\"\<Objects.dll\>\""}], "}"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.739105894797891*^9, 3.739105935253393*^9}, {
  3.7391059796056757`*^9, 3.739105997196041*^9}, {3.7391077273200736`*^9, 
  3.739107729104781*^9}, {3.739108134248423*^9, 3.739108134687853*^9}, {
  3.7395556476279216`*^9, 3.7395556485468063`*^9}},
 CellLabel->"In[1]:=",ExpressionUUID->"8aa2e240-abfa-44b5-894b-46319c343446"],

Cell[BoxData["\<\"D:\\\\github\\\\wolfram-librarylink-examples\\\\02-\
IntermediateExamples\\\\Objects\\\\build\\\\Debug\\\\Objects.dll\"\>"], \
"Output",
 CellChangeTimes->{
  3.7391058973058558`*^9, 3.7391059359695897`*^9, {3.7391059803083477`*^9, 
   3.739106001304367*^9}, 3.73910606979216*^9, 3.739107892266984*^9, 
   3.7391079875875406`*^9, 3.7391080771686153`*^9, {3.739108119506982*^9, 
   3.7391081585776176`*^9}, 3.739116923705617*^9, 3.7391171513657255`*^9, 
   3.739117374032791*^9, 3.7391178750563493`*^9, 3.7391243599416747`*^9, 
   3.739197612978427*^9, 3.7395556495525627`*^9},
 CellLabel->"Out[1]=",ExpressionUUID->"db61cb97-94e6-4ed5-b8ae-2801bc62bc11"]
}, Open  ]],

Cell["Load the library:", "Text",
 CellChangeTimes->{{3.7391061443316727`*^9, 
  3.7391061463706226`*^9}},ExpressionUUID->"efac2de3-09b8-4860-b07a-\
129a8fab3591"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"set", "=", 
   RowBox[{"LibraryFunctionLoad", "[", 
    RowBox[{"library", ",", "\"\<set\>\"", ",", 
     RowBox[{"{", 
      RowBox[{"Integer", ",", "Integer"}], "}"}], ",", "\"\<Void\>\""}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"getW", "=", 
   RowBox[{"LibraryFunctionLoad", "[", 
    RowBox[{"library", ",", "\"\<get_w\>\"", ",", 
     RowBox[{"{", "}"}], ",", "Integer"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"getH", "=", 
   RowBox[{"LibraryFunctionLoad", "[", 
    RowBox[{"library", ",", "\"\<get_h\>\"", ",", 
     RowBox[{"{", "}"}], ",", "Integer"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"compute", "=", 
   RowBox[{"LibraryFunctionLoad", "[", 
    RowBox[{"library", ",", "\"\<compute\>\"", ",", 
     RowBox[{"{", "}"}], ",", "Integer"}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.739105848717472*^9, 3.739105890216504*^9}, {
  3.7391059455571985`*^9, 3.7391059680762825`*^9}, {3.739107744320021*^9, 
  3.739107750657236*^9}, {3.739107950320916*^9, 3.739107953759204*^9}, {
  3.739555658010708*^9, 3.7395557271156096`*^9}},
 CellLabel->"In[10]:=",ExpressionUUID->"62a67b0b-d18f-44ae-9b33-57e569a713df"],

Cell["The function takes no arguments and returns \
\[OpenCurlyDoubleQuote]Hello World\[CloseCurlyDoubleQuote]:", "Text",
 CellChangeTimes->{{3.7391061174030013`*^9, 3.739106152995204*^9}, {
  3.7391077584797153`*^9, 
  3.739107761551409*^9}},ExpressionUUID->"c4e46aae-b9da-4740-b3d4-\
d971b591423b"],

Cell[BoxData[
 RowBox[{"set", "[", 
  RowBox[{"3", ",", "4"}], "]"}]], "Input",
 CellChangeTimes->{{3.7391060727245517`*^9, 3.739106076195772*^9}, {
  3.7391077531115847`*^9, 3.739107755206549*^9}, {3.739555730139521*^9, 
  3.7395557321623774`*^9}},
 CellLabel->"In[14]:=",ExpressionUUID->"2aee44e5-bd74-4776-b632-90871e9fb040"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"getW", "[", "]"}]], "Input",
 CellChangeTimes->{{3.7395557343640833`*^9, 3.739555735675885*^9}},
 CellLabel->"In[15]:=",ExpressionUUID->"b8e1866c-8b59-446a-988f-bdbe3b685bbd"],

Cell[BoxData["3"], "Output",
 CellChangeTimes->{3.739555735998103*^9},
 CellLabel->"Out[15]=",ExpressionUUID->"0f537c81-7d17-4bda-84df-2ca1ff444a49"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"getH", "[", "]"}]], "Input",
 CellChangeTimes->{{3.73955573694001*^9, 3.739555737955448*^9}},
 CellLabel->"In[16]:=",ExpressionUUID->"7afc75c4-b53d-40bd-859f-75604844a6df"],

Cell[BoxData["4"], "Output",
 CellChangeTimes->{3.7395557382377214`*^9},
 CellLabel->"Out[16]=",ExpressionUUID->"ba1832f8-64f3-48aa-a762-b64edf622c64"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"compute", "[", "]"}]], "Input",
 CellChangeTimes->{{3.73955573955599*^9, 3.7395557422595935`*^9}},
 CellLabel->"In[17]:=",ExpressionUUID->"453c9c55-c4d1-4939-85bd-4c8ca9713a70"],

Cell[BoxData["12"], "Output",
 CellChangeTimes->{3.739555742557881*^9},
 CellLabel->"Out[17]=",ExpressionUUID->"c61b42d5-617e-4657-8874-93c4598b5187"]
}, Open  ]],

Cell["Unload the library:", "Text",
 CellChangeTimes->{{3.739124382953955*^9, 
  3.739124385889764*^9}},ExpressionUUID->"9cda0e66-61be-45ed-8c1b-\
259daf4f0b37"],

Cell[BoxData[
 RowBox[{"LibraryUnload", "[", "library", "]"}]], "Input",
 CellChangeTimes->{{3.7391243720599732`*^9, 3.7391243780989137`*^9}},
 CellLabel->"In[18]:=",ExpressionUUID->"fc74a0ea-5f7e-45a2-89cb-f9fbabe2f70f"]
}, Open  ]]
},
WindowSize->{759, 833},
WindowMargins->{{259, Automatic}, {77, Automatic}},
FrontEndVersion->"11.3 for Microsoft Windows (64-bit) (March 6, 2018)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 250, 4, 96, "Title",ExpressionUUID->"1297967f-cb5a-4edf-9d0c-e27dd8a50146"],
Cell[833, 28, 161, 3, 34, "Text",ExpressionUUID->"c510ce96-e2d9-423d-b2ed-552735483f57"],
Cell[CellGroupData[{
Cell[1019, 35, 598, 11, 28, "Input",ExpressionUUID->"8aa2e240-abfa-44b5-894b-46319c343446"],
Cell[1620, 48, 672, 10, 52, "Output",ExpressionUUID->"db61cb97-94e6-4ed5-b8ae-2801bc62bc11"]
}, Open  ]],
Cell[2307, 61, 163, 3, 34, "Text",ExpressionUUID->"efac2de3-09b8-4860-b07a-129a8fab3591"],
Cell[2473, 66, 1239, 29, 86, "Input",ExpressionUUID->"62a67b0b-d18f-44ae-9b33-57e569a713df"],
Cell[3715, 97, 300, 5, 34, "Text",ExpressionUUID->"c4e46aae-b9da-4740-b3d4-d971b591423b"],
Cell[4018, 104, 328, 6, 28, "Input",ExpressionUUID->"2aee44e5-bd74-4776-b632-90871e9fb040"],
Cell[CellGroupData[{
Cell[4371, 114, 199, 3, 28, "Input",ExpressionUUID->"b8e1866c-8b59-446a-988f-bdbe3b685bbd"],
Cell[4573, 119, 149, 2, 32, "Output",ExpressionUUID->"0f537c81-7d17-4bda-84df-2ca1ff444a49"]
}, Open  ]],
Cell[CellGroupData[{
Cell[4759, 126, 196, 3, 28, "Input",ExpressionUUID->"7afc75c4-b53d-40bd-859f-75604844a6df"],
Cell[4958, 131, 151, 2, 32, "Output",ExpressionUUID->"ba1832f8-64f3-48aa-a762-b64edf622c64"]
}, Open  ]],
Cell[CellGroupData[{
Cell[5146, 138, 201, 3, 28, "Input",ExpressionUUID->"453c9c55-c4d1-4939-85bd-4c8ca9713a70"],
Cell[5350, 143, 150, 2, 32, "Output",ExpressionUUID->"c61b42d5-617e-4657-8874-93c4598b5187"]
}, Open  ]],
Cell[5515, 148, 161, 3, 34, "Text",ExpressionUUID->"9cda0e66-61be-45ed-8c1b-259daf4f0b37"],
Cell[5679, 153, 221, 3, 28, "Input",ExpressionUUID->"fc74a0ea-5f7e-45a2-89cb-f9fbabe2f70f"]
}, Open  ]]
}
]
*)

